/*final update 2025.02.03

This is the Alpha_Do_File that executes all .do files to replicate the analysis 
in "The Burden of Proof in Immigration Bond Decisions: An Impact Study of Brito v. Barr." */


capture log close

********************************************************************************
//STEP 01: Set Working Directory and Locals 
********************************************************************************

*Basic setup to execute all .do files
version	16.0
set 	linesize 100
set 	scheme s1manual
set 	more off, perm

* Change Directory to the Alpha_Do_File .do file's location
local 	home_folder "/Users/demattee/Desktop/JLC_Replication"
cd 		"`home_folder'"

* Set Locals
local 	who "YOURNAME"															
local 	pgm "Burden of Proof in Immigration Bond Decisions"
local 	dte "$S_DATE"
local 	tag "`pgm'_`who'"
di 		"Tag: `tag'"	

* Construct Date String Properly
local date_string : display %tdCY-N-D daily("$S_DATE", "DMY")

* Construct Full Log File Path
local log_file "`home_folder'/Log Files/`tag'_`date_string'.log"

* Display Log File Path for Debugging
di 		"`log_file'"

* Set Log File Location
log using	"`log_file'", replace text



********************************************************************************
//STEP 02: Initiate Synthetic Control Analyses								  
********************************************************************************

cd "`home_folder'/Scripts"
	do JLC_01a_Synth_Granted_Bond_Weekly.do
	
cd "`home_folder'/Scripts"
	do JLC_02a_Synth_Caseload_Weekly.do

cd "`home_folder'/Scripts"
	do JLC_03_MSPE_ratios.do

********************************************************************************
//STEP 03: END REPLICATION								  
********************************************************************************	
capture log close
exit

display c(current_time)
